package com.rest.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication  //@Configuration @EnableAutoConfiguration @ComponentSan
public class RestDemoApplication {

	public static void main(String[] args) {
		SpringApplication.run(RestDemoApplication.class, args);
	}
}

/**
 * springboot打包成war之后在tomcat运行用下面这种方式<br/>
 * 同时pom.xml嵌入的tomcat也要去除依赖，不然会和外部tomcat冲突
 */
//class RestDemoApplicationWar extends SpringBootServletInitializer {
//	@Override
//	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
//		return application.sources(RestDemoApplicationWar.class);
//	}
//}
